import request from "../utils/request.js"

//获取用户的商家信息
export function getUserStore(data) {
	return request({
		url: "/user/getUserStore",
		data
	})
}

//获取用户的商家信息
export function applyStore(data) {
	return request({
		url: "/user/applyStore",
		method: 'post',
		data
	})
}
//更新营业执照
export function updateLicense(data) {
	return request({
		url: "/user/updateLicense",
		method: 'post',
		data
	})
}

/**
 * 验证用户身份
 */
export function checkUserIdentity() {
	return request({
		url: "/user/checkUserIdentity",
	})
}
/**
 * 获取用户的身份列表
 */
export function getUserIdentity() {
	return request({
		url: "/user/getUserIdentity",
	})
}

//商家的房间列表
export function getRoomList(data) {
	return request({
		url: "/store/getRoomList",
		data
	})
}
//删除房间
export function delRoom(data) {
	return request({
		url: "/store/delRoom",
		method: 'DELETE',
		data
	})
}
//商家添加房间号
export function addRoom(data) {
	return request({
		url: "/store/addRoom",
		method: 'post',
		data
	})
}
//企业员工列表
export function getStaff(data) {
	return request({
		url: "/store/getStaff",
		data
	})
}
//商家添加员工
export function addStoreStaff(data) {
	return request({
		url: "/store/addStoreStaff",
		method: 'post',
		data
	})
}
//商家详情
export function staffDetail(data) {
	return request({
		url: "/store/staffDetail",
		data
	})
}
//获取店长罚款选项
export function getPenaltyOptions(data) {
	return request({
		url: "/store/getPenaltyOptions",
		data
	})
}
//获取店长罚款选择的房间订单列表
export function getFinishRoomOrder(data) {
	return request({
		url: "/store/getFinishRoomOrder",
		data
	})
}
//店长罚款 派单
export function addPenalty(data) {
	return request({
		url: "/store/addPenalty",
		method: 'post',
		data
	})
}
//店长罚款 派单
export function penaltyLst(data) {
	return request({
		url: "/store/penaltyLst",
		data
	})
}


//参数设定
export function confSave(data) {
	return request({
		url: "/store/confSave",
		method: 'post',
		data
	})
}
//服务费选项
export function getChargeType(data) {
	return request({
		url: "/store/getChargeType",
		data
	})
}
//服务费列表
export function serviceChargeList(data) {
	return request({
		url: "/store/serviceChargeList",
		data
	})
}
//服务费
export function serviceCharge(data) {
	return request({
		url: "/store/serviceCharge",
		method: 'post',
		data
	})
}
//商家信息
export function storeConf() {
	return request({
		url: "/store/storeConf"
	})
}
//设置员工在职离职
export function setStaffStatus(data) {
	return request({
		url: "/store/setStaffStatus",
		method: 'post',
		data
	})
}
//获取罚款列表 分页
export function penalty(data) {
	return request({
		url: "/store/penalty",
		data
	})
}
//取消罚款
export function cancelPenalty(data) {
	return request({
		url: "/store/cancelPenalty",
		method: 'put',
		data
	})
}

//商品列表
export function lst(data) {
	return request({
		url: "/store.goods/lst",
		data
	})
}
//商品分类
export function getCategory() {
	return request({
		url: "/store.goods/getCategory"
	})
}

//添加商品
export function add(data) {
	return request({
		url: "/store.goods/add",
		method: 'post',
		data
	})
}
//编辑产品
export function edit(data) {
	return request({
		url: "/store.goods/edit",
		method: 'post',
		data
	})
}
//产品详情
export function detail(data) {
	return request({
		url: "/store.goods/detail",
		data
	})
}

//商家订单列表
export function orderlst(data) {
	return request({
		url: "/store.order/lst",
		data
	})
}

//订单详情
export function orderdetail(data) {
	return request({
		url: "/store.order/detail",
		data
	})
}

//发货物流公司列表
export function getExpress(data) {
	return request({
		url: "/store.order/getExpress",
		data
	})
}

//商家发货
export function delivery(data) {
	return request({
		url: "/store.order/delivery",
		method: 'post',
		data
	})
}

//商家选择房间地区
export function chooseArea(data) {
	return request({
		url: "/store/chooseArea",
		method: 'post',
		data
	})
}

//查找用户的房间
export function getUserRoom() {
	return request({
		url: "/store/getUserRoom"
	})
}

//聊天记录
export function getChat(data) {
	return request({
		url: "/store/getChat",
		data
	})
}

//聊天房间列表
export function getStoreChatRoom() {
	return request({
		url: "/store/getStoreChatRoom"
	})
}



//发送消息
export function sendMsg(data) {
	return request({
		url: "/store/sendMsg",
		method: 'post',
		data
	})
}

//更新用户未读为0
export function updateUnread(data) {
	return request({
		url: "/store/updateUnread",
		method: 'post',
		data
	})
}

//房间用户
export function getChatRoomUser(data) {
	return request({
		url: "/store/getChatRoomUser",
		data
	})
}

//公主查看店员签到记录
export function getStaffSignList(data) {
	return request({
		url: "/store/getStaffSign",
		data
	})
}

/**店长查看房间使用情况
 * @param {Object} data
 */
export function getRoomDetail(data) {
	return request({
		url: "/store/getRoomDetail",
		data
	})
}

/**
 * 房间使用记录
 * @param {Object} data
 */
export function getRoomOrder(data) {
	return request({
		url: "/store/getRoomOrder",
		data
	})
}

/**
 * 房间订单详情
 * @param {Object} data
 */
export function roomOrderDetail(data) {
	return request({
		url: "/store/roomOrderDetail",
		data
	})
}

/**
 * 商家组
 * @param {Object} data
 */
export function getStoreGroup() {
	return request({
		url: "/store/getStoreGroup"
	})
}
/**
 * 房间历史订单
 * @param {Object} data
 */
export function getRoomHistoryOrder(data) {
	return request({
		url: "/store/getRoomHistoryOrder",
		data
	})
}
/**
 * 店长添加组
 * @param {Object} data
 */
export function addGroup(data) {
	return request({
		url: "/store/addGroup",
		method: 'post',
		data
	})
}


/**
 * 月收益
 * 
 */
export function getIncome(data) {
	return request({
		url: "/store/getIncome",
		data
	})
}

/**
 * 某一天收益详情
 * 
 */
export function dayIncome(data) {
	return request({
		url: "/store/dayIncome",
		data
	})
}

/**
 * 获取客讯数据
 * 
 */
export function getNews(data) {
	return request({
		url: "/store/getNews",
		data
	})
}

/**
 * 关店
 */
export function closeStore() {
	return request({
		url: "/store/closeStore",
		method: "post",
	})
}

/**
 * 店长查看监督表数据
 * @param {Object} data
 */
export function getWatch(data) {
	return request({
		url: "/store/getWatch",
		data
	})
}

/**
 * 生成小程序码（邀请会员加入商家）
 */
export function createQr() {
	return request({
		url: "/store/createQr"
	})
}

/**
 * 小程序码参数获取商家信息
 * @param {Object} data
 */
export function getStoreInfo(data) {
	return request({
		url: "/user/getStoreInfo",
		data
	})
}

/**
 * 加入商家
 * @param {Object} data
 */
export function joinStore(data) {
	return request({
		url: "/user/joinStore",
		method: "post",
		data
	})
}

/**
 * 审核员工
 * @param {Object} data
 */
export function verifyStaff(data) {
	return request({
		url: "/Store/verifyStaff",
		method: "post",
		data
	})
}

/**
 * 删除员工
 * @param {Object} data
 */
export function delStaff(data) {
	return request({
		url: "/Store/delStaff",
		method: "delete",
		data
	})
}

/**修改用户省区市
 * @param {Object} data
 */
export function saveUserRegion(data) {
	return request({
		url: "/User/saveUserRegion",
		method: "post",
		data
	})
}